const https = require('https');

const url = 'https://tqi.techlinkpets3d.com/api/daka/person_rank';

https.get(url, (res) => {
    let data = '';
    
    // 获取响应头信息
    console.log('Status Code:', res.statusCode);
    console.log('Headers:', res.headers);
    
    // 接收数据
    res.on('data', (chunk) => {
        data += chunk;
    });
    
    // 数据接收完毕
    res.on('end', () => {
        console.log('Raw Response:');
        console.log(data);
        
        // 尝试解析JSON
        try {
            const jsonData = JSON.parse(data);
            console.log('Parsed JSON:');
            console.log(JSON.stringify(jsonData, null, 2));
        } catch (error) {
            console.log('JSON Parse Error:', error.message);
        }
    });
}).on('error', (err) => {
    console.log('Error: ', err.message);
});